home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / Snippets / Sound / SetSoundInput / ReadMe next >
Encoding:
Text File  |  1995-02-28  |  1015 b   |  5 lines  |  [TEXT/ttxt]

  1. This application demonstrates how to set the sound input rate yourself in order to record at the highest possible sound quality. This is in response to inquiries about why using SndRecord() or SndRecordToFile() does not produce highest quality sound resources/sound files when using the siBestQuality selector (when in fact the hardware supports better).  This is due to the fact that siBestQuality =  8-bit at 22kHz (see page 3-24 of Inside Macintosh: Sound).  If your sound hardware supports a higher sample size or sample rate than this you'll need to use the Sound Manager calls SPBOpenDevice, SPBGetDeviceInfo, SPBSetDeviceInfo, and SPBRecord or SPBRecordToFile.
  2.  
  3. The sample application sets up an AIFF file and the sound input hardware using the highest possible sample rate and sample size for that hardware.  It then records to the AIFF file using SPBRecordToFile.  As soon as recording is finished the AIFF file is setup for playback and SndStartFilePlay() is used to playback the sound.
  4.  
  5. --Kevin Mellander